-- GENERATED SPELL FOR [Spirestone Battle Mage] --


function spell0_9197(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(16170,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9197', 30324, 1)
end

function spell1_9197(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(15305,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9197', 3000, 1)
end

function Sorts_9197(pUnit, Event)
local choix_sorts_9197 = math.random(0, 1)
if choix_sorts_9197 == 0 then
pUnit:RegisterEvent('spell0_9197', 1, 1)
end
if choix_sorts_9197 == 1 then
pUnit:RegisterEvent('spell1_9197', 1, 1)
end
end

function mob9197_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9197', math.random(1500, 3000), 1)
end

function mob9197_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9197_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9197_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9197, 1, 'mob9197_Action')
RegisterUnitEvent(9197, 2, 'mob9197_Leave')
RegisterUnitEvent(9197, 3, 'mob9197_Kill')
RegisterUnitEvent(9197, 4, 'mob9197_Die')
